package com.youku.plugins.searchBarV4
{
   import com.youku.interfaces.IPlugin;
   import com.youku.plugins.searchBarV4.view.SearchBarMediator;
   import flash.display.MovieClip;
   import com.youku.interfaces.IPlayerProxy;
   import com.youku.plugins.PluginEventDispather;
   
   public class SearchBarFacade extends Object implements IPlugin
   {
      
      public function SearchBarFacade() {
         super();
      }
      
      private static var _instance:SearchBarFacade;
      
      public static function getInstance() : SearchBarFacade {
         if(_instance == null)
         {
            _instance = new SearchBarFacade();
         }
         return _instance as SearchBarFacade;
      }
      
      private var _searchBarMediator:SearchBarMediator;
      
      public function init(param1:MovieClip, param2:IPlayerProxy) : void {
         if(param2.rootGetData.rootWinType == "exterior" || param2.rootGetData.rootWinType == "BDskin")
         {
            this._searchBarMediator = new SearchBarMediator(param1,param2,PluginEventDispather.getInstance());
         }
      }
   }
}
